package zzz.a;

import java.awt.Color;

public class Square {
	private Point2D	p1, p2;
	public Color	color;

	public Square(final Point2D p1, final Point2D p2, final Color col) {
		this.p1 = p1;
		this.p2 = p2;
		this.color = col;
	}
	
	public Square(final Point2D p1, final Point2D p2) {
		this.p1 = p1;
		this.p2 = p2;
		color = new Color(255, 0, 0);
		;
	}
	
	public Square(Point2D p1, Point2D p2, Color color) {
		super();
		this.p1 = p1;
		this.p2 = p2;
		this.color = color;
	}
	
	public void randomizeColor() {
		int r = (int) (Math.random() * 256);
		int g = (int) (Math.random() * 256);
		int b = (int) (Math.random() * 256);
		this.color = new Color(r, g, b);
	}

	public void draw() {

	}
	
	public Point2D getP1() {
		return p1;
	}
	
	public void setP1(Point2D p1) {
		this.p1 = p1;
	}
	
	public Point2D getP2() {
		return p2;
	}
	
	public void setP2(Point2D p2) {
		this.p2 = p2;
	}
	
	public Color getColor() {
		return color;
	}
	
	public void setColor(Color color) {
		this.color = color;
	}
	
}
